From: Andrew Cooper Date: Thu, 27 Nov 2014 12:34:34 +0000 (+0000) Subject: python/xs: Correct the indirection of the NULL xshandle() check X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~4032 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=78b3afe2e5764b3ac61c46042c63619455483999;p=xen.git python/xs: Correct the indirection of the NULL xshandle() check The code now now matches its comment, and will actually catch the case of a bad xs handle. Signed-off-by: Andrew Cooper Coverity-ID: 1055948 CC: Ian Campbell CC: Ian Jackson CC: Wei Liu CC: Xen Coverity Team Acked-by: Ian Campbell --- diff --git a/tools/python/xen/lowlevel/xs/xs.c b/tools/python/xen/lowlevel/xs/xs.c index 84e1711f60..ec364bb535 100644 --- a/tools/python/xen/lowlevel/xs/xs.c +++ b/tools/python/xen/lowlevel/xs/xs.c @@ -816,7 +816,7 @@ static int parse_transaction_path(XsHandle *self, PyObject *args, *xh = xshandle(self); - if (!xh) + if (!*xh) return 0; if (!PyArg_ParseTuple(args, "ss", &thstr, path))